﻿// -------------------------------------------------------------------------
//    @FileName         :    NFCreditShopPart.cpp
//    @Author           :    gaoyi
//    @Date             :    24-8-30
//    @Email            :    445267987@qq.com
//    @Module           :    NFCreditShopPart
//
// -------------------------------------------------------------------------

#include "NFCreditShopPart.h"

#include "proto_db.pb.h"

NFCreditShopPart::NFCreditShopPart()
{
    if (EN_OBJ_MODE_INIT == NFShmMgr::Instance()->GetCreateMode())
    {
        CreateInit();
    }
    else
    {
        ResumeInit();
    }
}

NFCreditShopPart::~NFCreditShopPart()
{
}

int NFCreditShopPart::CreateInit()
{
    return 0;
}
    
int NFCreditShopPart::ResumeInit()
{
    return 0;
}

int NFCreditShopPart::LoadFromDB(const proto_ff::tbRoleDetail *pDBData)
{
    m_stData.FromPb(pDBData->role_play_data().credit_shop_data());
    return 0;
}

int NFCreditShopPart::InitConfig(proto_ff::tbRoleDetail *pDbData, const RoleOne &stRoleOne)
{
    pDbData->mutable_role_play_data()->mutable_credit_shop_data();
    return 0;
}

int NFCreditShopPart::SaveDB(proto_ff::tbRoleDetail *pDBData)
{
    m_stData.ToPb(pDBData->mutable_role_play_data()->mutable_credit_shop_data());
    return 0;
}

int NFCreditShopPart::MakePlayerDataCS(proto_ff::Proto_CSGetRoleRsp* pCSGetRoleRsp)
{
    return 0;
}

int NFCreditShopPart::MakeCityPlayerData(proto_ff::CityRoleInfo* pGCCityRoleInfo)
{
    return 0;
}
